Skip to content

Align repository with DPC conventions#62

Merged
dmccoystephenson merged 4 commits intomasterfrom
copilot/align-repo-with-dpc-conventions
Apr 26, 2026
Merged

Align repository with DPC conventions#62
dmccoystephenson merged 4 commits intomasterfrom
copilot/align-repo-with-dpc-conventions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 22, 2026

  • Update README.md with all required sections (Description, Installation, Usage, Support, Contributing, Testing, Development, Authors, License, Project Status)
  • Create CONTRIBUTING.md using DPC template
  • Create USER_GUIDE.md
  • Create COMMANDS.md
  • Create CONFIG.md
  • Create CHANGELOG.md
  • Create .github/workflows/build.yml (JDK 8 to match pom.xml target; permissions: contents: read)
  • Create .github/workflows/release.yml (JDK 8; exclude original-*.jar from release assets)
  • Create .github/copilot-instructions.md
  • Address first-round reviewer feedback (JDK, JAR glob, Testing sections, CONFIG.md reference, copilot-instructions.md notes)
  • Address second-round reviewer feedback:
    • plugin.yml: fix permission node names to match code (spawnsystem.* not dansplugins.*); add missing spawnsystem.admin node
    • COMMANDS.md: add player-only note to /resetspawn usage line
    • README.md: rename "Authors and Acknowledgement" → "Authors" to match DPC-required section name
Original prompt

Align this repository with the DPC (Dans Plugins Community) conventions defined at
https://github.com/Dans-Plugins/dpc-conventions.

Read each of the following convention documents in full before making any changes:

Then perform the following steps:

  1. Inspect the repository — read README.md, CONTRIBUTING.md, any existing docs/, and
    .github/workflows/ files to understand the current state.

  2. Build a gap checklist comparing the repo against every requirement in the convention
    documents above.

  3. Implement all required changes directly in the repository:

    • Update README.md to include all required sections in the correct order, following
      the templates in README_STRUCTURE.md.
    • Create or update CONTRIBUTING.md using the template in CONTRIBUTING_STANDARDS.md.
    • Create any missing documentation files (USER_GUIDE.md, COMMANDS.md, CONFIG.md,
      CHANGELOG.md) with appropriate starter content derived from the plugin's existing
      code and configuration.
    • Add or update .github/workflows/build.yml using the CI template in TESTING_AND_CI.md.
    • Add or update .github/workflows/release.yml using the template in RELEASE_AUTOMATION.md.
    • Create or update .github/copilot-instructions.md using the template in GITHUB_COPILOT_INSTRUCTIONS.md.
    • Make any other changes needed to satisfy the conventions.
  4. Do not restate convention rules in commit messages or comments — reference the
    relevant convention document URL instead.

Keep changes minimal and focused on closing the identified gaps. Do not refactor
existing code or alter plugin behaviour.


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Align repository with DPC conventions Align repository with DPC conventions Mar 22, 2026
Copilot AI requested a review from dmccoystephenson March 22, 2026 18:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns the repository with DPC conventions by adding the expected documentation set plus basic CI/release automation and Copilot contributor context.

Changes:

  • Rewrites/creates core documentation files (README, guides, commands/config reference, changelog, contributing guide).
  • Adds GitHub Actions workflows for build-on-push/PR and release artifact attachment.
  • Adds .github/copilot-instructions.md to document stack, structure, and contribution workflow for Copilot-assisted changes.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
README.md Reworked to match DPC README section structure and link to new docs.
USER_GUIDE.md Adds end-user/admin usage instructions and permissions table.
COMMANDS.md Documents /resetspawn usage and permissions.
CONFIG.md Documents that there’s no config.yml and lists permission nodes.
CHANGELOG.md Introduces Keep a Changelog–style changelog scaffold.
CONTRIBUTING.md Adds contribution workflow and local build/test instructions.
.github/workflows/build.yml CI build workflow on pushes/PRs to main and develop.
.github/workflows/release.yml Release workflow that builds and uploads jars to GitHub Releases.
.github/copilot-instructions.md Captures project stack/structure/conventions for Copilot usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml Outdated
- name: Upload JAR to release
uses: softprops/action-gh-release@v2
with:
files: target/*.jar
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

files: target/*.jar will likely upload multiple jars when using the Maven Shade plugin (e.g., both the shaded jar and original-*.jar). Consider narrowing the glob to only the intended distributable (or explicitly excluding original-*) so releases don’t contain confusing/incorrect artifacts.

Suggested change
files: target/*.jar
files: |
target/*.jar
!target/original-*.jar

Copilot uses AI. Check for mistakes.
Comment thread README.md Outdated
Comment on lines +58 to +66
### Test Server with Plugin Hot-Reloading

A Docker-based test server can be used for development.

#### Setup

1. Build the plugin: `mvn clean package`
2. Copy the resulting jar from `target/` into your server's `plugins/` folder.
3. Start your test server.
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section mentions a “Docker-based test server”, but there are no Dockerfiles / docker-compose configs in the repo. Either add the referenced Docker setup (and link to it) or remove/adjust this wording so contributors aren’t sent looking for non-existent tooling.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release.yml Outdated
Comment on lines +17 to +20
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same concern as build workflow: the repo targets Java 8 bytecode (per pom.xml), but this release workflow builds on JDK 17. Consider switching to JDK 8 or enforcing --release 8 via Maven configuration/toolchains to avoid publishing jars that won’t run on older servers.

Suggested change
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'

Copilot uses AI. Check for mistakes.
Comment thread .github/copilot-instructions.md Outdated
- Language: Java
- Build tool: Maven
- Target platform: Spigot / Paper (Minecraft plugin, API version 1.13+)
- Test framework: JUnit (via Maven Surefire)
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lists “Test framework: JUnit (via Maven Surefire)”, but pom.xml currently has no JUnit (or other test) dependency configured. Update this to match the actual setup (or add the missing test dependencies/config).

Suggested change
- Test framework: JUnit (via Maven Surefire)
- Test framework: Not yet configured (add JUnit via Maven Surefire in pom.xml when introducing tests)

Copilot uses AI. Check for mistakes.
Comment thread .github/copilot-instructions.md Outdated
- `data/` – Persistent data model
- `bstats/` – bStats metrics integration
- `src/main/resources/` – `plugin.yml` and other resources
- `src/test/java/` – Unit tests
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This references src/test/java/ for unit tests, but the repository currently has no src/test directory. Either add the missing test directory/tests or adjust this project-structure note so it stays accurate.

Suggested change
- `src/test/java/` – Unit tests
- `src/test/java/` – Unit tests (if/when a test suite is added)

Copilot uses AI. Check for mistakes.
Comment thread README.md Outdated
Comment on lines +44 to +55
### Unit Tests

Linux:

mvn clean test

Windows:

mvn.cmd clean test

If you see `BUILD SUCCESS`, the tests have passed.

Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README describes running “Unit Tests”, but the repository currently has no src/test/java directory and pom.xml has no JUnit/test dependencies. This makes the Testing section misleading; consider either adding an initial test setup or updating the section to reflect that there are currently no automated tests (and how to validate changes instead).

Suggested change
### Unit Tests
Linux:
mvn clean test
Windows:
mvn.cmd clean test
If you see `BUILD SUCCESS`, the tests have passed.
### Automated Tests
This project does not currently include automated unit tests.
To verify that the project builds successfully, run:
Linux:
mvn clean package
Windows:
mvn.cmd clean package
If you see `BUILD SUCCESS`, the project compiled successfully.
For validating functional changes, follow the steps in the **Development** section below to run the plugin on a test server.

Copilot uses AI. Check for mistakes.
Comment thread README.md Outdated
2. Copy the resulting jar from `target/` into your server's `plugins/` folder.
3. Start your test server.

## Authors and Acknowledgement
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says the README follows the required section names/order (including an “Authors” section). The README uses “Authors and Acknowledgement” instead, which may not satisfy tooling or checklist expectations that look for the exact “Authors” heading. Consider renaming this heading to match the convention/PR claim.

Copilot uses AI. Check for mistakes.
Comment thread CONFIG.md Outdated
| `spawnsystem.reset.others` | op | Allows resetting another player's spawn |
| `spawnsystem.admin` | op | Grants all plugin permissions |

These defaults are defined in `src/main/resources/plugin.yml` and can be overridden by your permissions plugin.
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line says the permission defaults are defined in src/main/resources/plugin.yml, but the current plugin.yml does not declare these spawnsystem.* nodes (it declares different nodes). Either update plugin.yml to match the documented permission nodes/defaults, or adjust this documentation so it doesn’t point to an incorrect source of truth.

Suggested change
These defaults are defined in `src/main/resources/plugin.yml` and can be overridden by your permissions plugin.
By default, these permissions are granted to server operators (`op`) and can be overridden by your permissions plugin.

Copilot uses AI. Check for mistakes.
Comment thread CONTRIBUTING.md Outdated
Comment on lines +52 to +56
Run the unit tests with:

Linux: `mvn clean test`
Windows: `mvn.cmd clean test`

Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section instructs contributors to run “unit tests”, but there is currently no src/test/java directory and pom.xml has no test dependencies configured. Consider updating this section to state that there are no automated tests yet (and what manual verification is expected), or add a minimal test setup so these instructions are actionable.

Suggested change
Run the unit tests with:
Linux: `mvn clean test`
Windows: `mvn.cmd clean test`
There are currently no automated unit tests configured for this project.
Please verify your changes manually by:
- Building the plugin: `mvn clean package`
- Copying the built JAR from `target/` into your test server's `plugins` folder
- Starting the server and ensuring the plugin loads without errors in the console
- Exercising relevant spawn-related functionality to confirm your changes behave as expected

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/build.yml Outdated
Comment on lines +19 to +22
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project is configured to compile for Java 8 (pom.xml sets <java.version>1.8</java.version>), but this workflow builds on JDK 17. Building on 17 without using --release 8/toolchains can accidentally allow compilation against newer JDK APIs and produce artifacts that won’t run on Java 8 servers. Consider building on JDK 8 (and optionally also 17), or update Maven compiler config to use maven.compiler.release=8 (or toolchains) to enforce Java 8 compatibility.

Suggested change
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'

Copilot uses AI. Check for mistakes.
@dmccoystephenson
Copy link
Copy Markdown
Member

@copilot address comments

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 22, 2026

@copilot address comments

All reviewer comments addressed in commit 6ed2bf6:

  • Workflows (build + release): switched from JDK 17 to JDK 8 to match <java.version>1.8</java.version> in pom.xml
  • release.yml: narrowed JAR glob to target/*.jar + !target/original-*.jar to exclude the Maven Shade original-* artifact
  • README Testing section: replaced misleading "Unit Tests" / mvn clean test instructions with a build-only verification step; removed reference to non-existent Docker setup
  • CONTRIBUTING.md Testing section: replaced unit-test run instructions with manual verification steps since no test suite exists
  • CONFIG.md: removed the inaccurate claim that permission defaults are defined in plugin.yml
  • copilot-instructions.md: corrected test framework note (not yet configured) and src/test/java/ note (if/when a test suite is added)

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CONFIG.md
Comment on lines +9 to +15
| Permission Node | Default | Description |
|-----------------|---------|-------------|
| `spawnsystem.placeSpawnSign` | op | Allows placing `[Spawn]` signs |
| `spawnsystem.breakSpawnSign` | op | Allows breaking `[Spawn]` signs |
| `spawnsystem.reset.self` | op | Allows a player to reset their own spawn |
| `spawnsystem.reset.others` | op | Allows resetting another player's spawn |
| `spawnsystem.admin` | op | Grants all plugin permissions |
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The permissions table is using || at the start of each row, which renders as an extra empty column in Markdown. Switch to standard Markdown table formatting (single leading |, consistent trailing |).

Copilot uses AI. Check for mistakes.
Comment thread COMMANDS.md Outdated
**Description:** Resets a player's custom spawn point, returning them to the world's default spawn on next death.
**Permission (no argument):** `spawnsystem.reset.self` or `spawnsystem.admin`
**Permission (with argument):** `spawnsystem.reset.others` or `spawnsystem.admin`
**Usage:** `/resetspawn` or `/resetspawn <player>`
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command currently only performs any action when executed by an in-game player (the implementation returns early for non-player senders). The docs should mention that /resetspawn is player-only, or the command should be updated to support console execution (with appropriate feedback).

Suggested change
**Usage:** `/resetspawn` or `/resetspawn <player>`
**Usage:** (in-game players only) `/resetspawn` or `/resetspawn <player>`

Copilot uses AI. Check for mistakes.
Comment thread USER_GUIDE.md
Comment thread USER_GUIDE.md
Comment thread README.md
Comment on lines +72 to +74
| Name | Main Contributions |
|------|--------------------|
| DanTheTechMan | Original author and lead developer |
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Developers table is using || at the start of the header/rows, which creates an extra empty column in Markdown. Use a single leading | (and consistent trailing |) so the table renders as intended.

Copilot uses AI. Check for mistakes.
@dmccoystephenson
Copy link
Copy Markdown
Member

@copilot address comments

… README heading

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Dans-Plugins/Dans-Spawn-System/sessions/b0b63dde-9578-4420-8558-db37bf9a98b7
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 22, 2026

@copilot address comments

All reviewer comments addressed in commit 2446cea:

  • plugin.yml: Replaced the mismatched dansplugins.* permission node declarations with spawnsystem.* nodes that match what the code actually checks; also added the missing spawnsystem.admin node so permissions plugins register the correct defaults.
  • COMMANDS.md: Added "(in-game players only)" to the usage line, reflecting the code's early-return behaviour for non-player senders.
  • README.md: Renamed "Authors and Acknowledgement" → "Authors" to match the DPC-required section name.

Regarding the || table formatting comments — the raw file content was already using correct single-| delimiters in all three tables; no changes were needed there.

@dmccoystephenson dmccoystephenson merged commit 09c1a41 into master Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants